<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8"/>
    <title>表单演示</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 20px;
            background-color: #f5f5f5;
        }

        .form-container {
            max-width: 600px;
            margin: 0 auto;
            background-color: white;
            padding: 30px;
            border-radius: 8px;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }

        .form-header {
            text-align: center;
            margin-bottom: 30px;
        }

        .form-group {
            margin-bottom: 20px;
        }

        label {
            display: block;
            margin-bottom: 5px;
            color: #333;
            font-weight: bold;
        }

        input[type="text"],
        input[type="email"],
        input[type="tel"],
        textarea,
        select {
            width: 100%;
            padding: 8px;
            border: 1px solid #ddd;
            border-radius: 4px;
            box-sizing: border-box;
        }

        .checkbox-group {
            margin-top: 10px;
        }

        .checkbox-group label {
            display: inline-block;
            margin-right: 15px;
            font-weight: normal;
        }

        textarea {
            height: 100px;
            resize: vertical;
        }

        .btn-submit {
            background-color: #4caf50;
            color: white;
            padding: 10px 20px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            width: 100%;
            font-size: 16px;
        }

        .btn-submit:hover {
            background-color: #45a049;
        }

        .error {
            color: red;
            font-size: 14px;
            margin-top: 5px;
        }
    </style>
</head>
<body>
<div class="form-container">
    <div class="form-header">
        <h1>表单演示</h1>
    </div>

    <form action="process-form" method="post">
        <div class="form-group">
            <label for="name">姓名：</label>
            <input type="text" id="name" name="name" required/>
        </div>

        <div class="form-group">
            <label for="email">邮箱：</label>
            <input type="email" id="email" name="email" required/>
        </div>

        <div class="form-group">
            <label for="phone">电话：</label>
            <input type="tel" id="phone" name="phone" required/>
        </div>

        <div class="form-group">
            <label>性别：</label>
            <div class="checkbox-group">
                <label>
                    <input type="radio" name="gender" value="male" required/> 男
                </label>
                <label>
                    <input type="radio" name="gender" value="female"/> 女
                </label>
            </div>
        </div>

        <div class="form-group">
            <label>爱好：</label>
            <div class="checkbox-group">
                <label>
                    <input type="checkbox" name="hobbies" value="reading"/> 阅读
                </label>
                <label>
                    <input type="checkbox" name="hobbies" value="sports"/> 运动
                </label>
                <label>
                    <input type="checkbox" name="hobbies" value="music"/> 音乐
                </label>
                <label>
                    <input type="checkbox" name="hobbies" value="travel"/> 旅行
                </label>
            </div>
        </div>

        <div class="form-group">
            <label for="address">地址：</label>
            <textarea id="address" name="address" required></textarea>
        </div>

        <div class="form-group">
            <label for="message">留言：</label>
            <textarea id="message" name="message"></textarea>
        </div>

        <button type="submit" class="btn-submit">提交</button>
    </form>
</div>
</body>
</html>
